package com.ruoyi.project.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mapper.HeDepartmentMapper;
import com.ruoyi.project.domain.HeDepartment;
import com.ruoyi.project.service.IHeDepartmentService;

/**
 * 科室统计Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-09-02
 */
@Service
public class HeDepartmentServiceImpl implements IHeDepartmentService 
{
    @Autowired
    private HeDepartmentMapper heDepartmentMapper;

    /**
     * 查询科室统计
     * 
     * @param id 科室统计主键
     * @return 科室统计
     */
    @Override
    public HeDepartment selectHeDepartmentById(Long id)
    {
        return heDepartmentMapper.selectHeDepartmentById(id);
    }

    /**
     * 查询科室统计列表
     * 
     * @param heDepartment 科室统计
     * @return 科室统计
     */
    @Override
    public List<HeDepartment> selectHeDepartmentList(HeDepartment heDepartment)
    {
        return heDepartmentMapper.selectHeDepartmentList(heDepartment);
    }

    /**
     * 新增科室统计
     * 
     * @param heDepartment 科室统计
     * @return 结果
     */
    @Override
    public int insertHeDepartment(HeDepartment heDepartment)
    {
        return heDepartmentMapper.insertHeDepartment(heDepartment);
    }

    /**
     * 修改科室统计
     * 
     * @param heDepartment 科室统计
     * @return 结果
     */
    @Override
    public int updateHeDepartment(HeDepartment heDepartment)
    {
        heDepartment.setUpdateTime(DateUtils.getNowDate());
        return heDepartmentMapper.updateHeDepartment(heDepartment);
    }

    /**
     * 批量删除科室统计
     * 
     * @param ids 需要删除的科室统计主键
     * @return 结果
     */
    @Override
    public int deleteHeDepartmentByIds(Long[] ids)
    {
        return heDepartmentMapper.deleteHeDepartmentByIds(ids);
    }

    /**
     * 删除科室统计信息
     * 
     * @param id 科室统计主键
     * @return 结果
     */
    @Override
    public int deleteHeDepartmentById(Long id)
    {
        return heDepartmentMapper.deleteHeDepartmentById(id);
    }
}
